<?php
defined('SYSPATH') OR die('No direct access allowed.');
/**
 * index.php
 * @author ranuandra
 *
 * 30 Apr 2012 22:46:45
 *
 * 
 */
?>


<div class="container">
	<div class="row">
		<div class="span12">
			<img src="<?php echo URL::base()?>assets/images/karir.jpg" />
		</div>
	</div>
	<hr></hr>
	<div class="row">
		<div class="span12">
			<span class="pull-right">
				<a href="www.facebook.com"><img src="<?php echo URL::base()?>assets/images/glyphicons_390_facebook.png" /></a>
				<a href="www.twitter.com"><img src="<?php echo URL::base()?>assets/images/glyphicons_391_twitter_t.png" /></a>
			</span>
		</div>
	</div>
	<hr></hr>
    <header class="" id="overview">
      <div class="page-header">
          <h1><?php echo $data->deskripsi ?></h1>
      </div>
    </header>
     <div class="row">
    	<div class="span8">
    	<h2>Deskripsi</h2>
 		<dl class="dl-horizontal">
 			<dt>Area Of Work</dt>
 			<dd><?php echo $data->mstareaofwork->areaofwork ?></dd>
 			<dt>Pendidikan</dt>
 			<dd><?php echo $data->mstpendidikan->pendidikan ?></dd>
 			<dt>Ditutup Tanggal</dt>
 			<dd><?php echo date("d-m-Y", strtotime( $data->dateto ) ) ?></dd>
 		</dl>
     
			<h2>Syarat Umum</h2>
			<?php echo $data->kualifikasi_umum ?>
			<h2>Syarat Khusus</h2>
			<ul class="syarat">
			<?php echo $data->kualifikasi_khusus ?>
            </ul>
            <hr class="soften"> 
            <div class="apply-bar">
            <?php 
            if(Auth_ORM::instance()->logged_in())
            {

            	if($next == true && $cek_data == true)
            	{
            ?>
            <br/>
			<a href="<?php echo URL::base() ?>lowongan/confirm/<?php echo $data->id?>" class="btn btn-success btn-large">
        		<i class="icon-user icon-white"></i> Ajukan Lamaran
        	</a>
        	<br/>
        	<small>Terima Kasih sudah mengisi data dengan lengkap, silahkan klik Ajukan Lamaran untuk melamar posisi tersebut diatas.</small>
            	
			<?php 
            	} 
            	elseif($next == false && $cek_data == true) {
					echo $message;
            	}
            	elseif($cek_data == false)
            	{
            ?>
            	<br/>
	 			<a href="<?php echo URL::base() ?>user" class="btn btn-danger btn-large">
	        		<i class="icon-user icon-white"></i> Lengkapi Data
	        	</a> <br/> 
	        	Maaf data profile Anda belum lengkap. Mohon lengkapi data profile untuk mengajukan lamaran
        	<?php          		
            	}

            } else 
            {
            ?>
           	<a href="<?php echo URL::base() ?>home/login" class="btn btn-success btn-large">
        		<i class="icon-lock icon-white"></i> Member Login
        	</a> 
        	<a href="<?php echo URL::base() ?>home/register" class="btn btn-success btn-large">
        		<i class="icon-user icon-white"></i> Registrasi Gratis
        	</a>
            <?php 
            }
            ?>
            </div>

    	</div>
		<div class="span4">
<?php
if(!Auth_ORM::instance()->logged_in())
{
?>  
			
			<div class="well center">
	        	<a href="<?php echo URL::base() ?>home/login" class="btn btn-success btn-medium">
	        		<i class="icon-lock icon-white"></i> Login
	        	</a>
	        	<a href="<?php echo URL::base() ?>home/register" class="btn btn-warning btn-medium">
	        		<i class="icon-user icon-white"></i> Registrasi
	        	</a>
        	</div>			
<?php 
}
?>

			<div class="well">
				<h2>Lowongan Terbaru</h2>
				<div id="scroll">
					<ul>
					<?php 
					foreach($datas as $data)
					{
					?>
					<li>
						<div>
							<?php echo date("d M Y", strtotime( $data->dateto ) ) ?> <a href="<?php echo URL::base()?>lowongan/detail/<?php echo $data->id?>"><?php echo $data->deskripsi?></a>
						</div>
					</li>
					<?php 
					}
					?>

					</ul>				
				</div>
			</div>
		</div>
    </div>
</div>
